<%@ page language="java"%>
<%@ page import="org.apache.struts.Globals"%>
<%@ page import="java.util.Locale"%>
<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic"%>
<%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean"%>
<%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html xhtml="true">
<head>
<meta http-equiv="Content-Type" content="text/html" />
<script type="text/javascript" src="../dojo/dojo/dojo.js"></script>
<title></title>
<script type="text/javascript">
//New: Require in the dojo.fx module
dojo.require("dojo.fx");
 
function init(){
    	showResult = function(response, ioArgs){
    		//alert(response);
    	};
    	showError = function(response, ioArgs){
    		//alert('error:'+response);
    	};
    	dojo.xhrGet({
    		url: '../showDropdown.do',
    		//content: { hello: 'world'},
    		load: showResult,
    		error:showError
    	});
};
dojo.ready(init);
</script>
</head>
<body tabindex="-1">
	<html:form action="/showDropdown">
		<div>
			<table>
				<tr>
					<td>
					<c:choose>
							<c:when test="${empty dropdownForm.mapViewId}">
								<script>
									alert("${empty dropdownForm.mapViewId}");
								</script>
								<html:select property="mapViewId">
									<option value=""></option>
									<!--html:optionsCollection name="dropdownForm" property="savedViews"/-->
								</html:select>
							</c:when>
							<c:otherwise>
								<html:select property="mapViewId">
									<option value="">${dropdownForm.mapViewId}</option>
									<html:optionsCollection name="dropdownForm" property="savedViews" label="label" value="value"/>
								</html:select>
							</c:otherwise>
						</c:choose>
					</td>
				</tr>
			</table>
		</div>
	</html:form>
	<iframe id="mapForm" name="mapForm" src="<html:rewrite page="/showDropdown"/>" frameborder="0" scrolling="no">
	</iframe>
</body>
</html:html>